#include "CF.h"
#include "CF_NewSceneDialog.h"
#include <QMessageBox>

CF_NewSceneDialog::CF_NewSceneDialog(QWidget*parent)
	: QDialog(parent)
{
	ui.setupUi(this);
}

CF_NewSceneDialog::~CF_NewSceneDialog()
{

}

void CF_NewSceneDialog::ok()
{
	if(getName().isEmpty())
	{
		QMessageBox::warning(this, tr("Warning"), tr("Please input scene name"), QMessageBox::Close);
		ui.nameEdit->setFocus();
		return;
	}

	QDialog::accept();
}

void CF_NewSceneDialog::cancel()
{
	QDialog::reject();
}